<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>百度</title>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <style>
        body {
            max-width: 800px;
            margin: 0 auto;
        }

        #box {
            width: 100%;
        }
        .div-fixed2{
            position: fixed;
            right: 5px;
            top:40%;
            z-index: 999;
            text-align: center;
        }

        .div-fixed2 button {
            width: 76px;
            font-size: 14px;
            height: 30px;
            line-height: 28px;
        }
        .form{
            padding: 30px 8px 8px 8px;
            font-size: 20px;
        }
        .form-div{
            display: flex;
            margin-bottom: 16px;
        }
        .form-div .l{
            width: 130px;
        }
        .form-div .r{
            width: calc(100% - 150px);
        }
        .form-div .r textarea{
            width:100%;
            font-size: 16px;
            box-sizing: border-box;
        }
        #token3{
            height: 150px;
        }
        #token4{
            height: 150px;
        }
        #saveBtn{
            width:100%;
            height: 60px;
            font-size: 24px;
        }
        button {
            margin-bottom: 5px;
        }
    </style>
</head>

<body>
    <div id="box">
        <div class="div-fixed2">
            <button type="button" onclick="window.location.reload()">刷新</button><br />
            <button type="button" onclick="window.location.href = './hs2.html'">主页</button><br />
            <button type="button" onclick="window.location.href = './hs_token.html'">token</button><br />
        </div>
        <div class="form">
            <div class="form-div">
                <div class="l">
                    全部token（大号）
                </div>
                <div class="r">
                    <textarea id="token3" placeholder="请输入token"></textarea>
                </div>
            </div>
            <div class="form-div">
                <div class="l">
                    全部token（小号）
                </div>
                <div class="r">
                    <textarea id="token4" placeholder="请输入token"></textarea>
                </div>
            </div>
            <div class="form-div">
                <div class="l">
                    全部token（仓库）
                </div>
                <div class="r">
                    <textarea id="token5" placeholder="请输入token"></textarea>
                </div>
            </div>
            <div class="form-div">
                <div class="l">
                    
                </div>
                <div class="r">
                    <button id="saveBtn" type="button" onclick="saveToken()">保  存</button>
                </div>
            </div>
        </div>
        <br />
        [<span id="setInterval"></span>]
    </div>
    <script src="./jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="./hs.js?v1.2.6"></script>
    <script>
        function saveToken(){
            let token3 = document.getElementById("token3").value;
            let token4 = document.getElementById("token4").value;
            let token5 = document.getElementById("token5").value;
            if(token3){
                let token_list_all = [];
                let token_list_all_arr = token3.split(",");
                for(let i=0;i<token_list_all_arr.length;i++){
                    let item_token = token_list_all_arr[i];
                    token_list_all.push(item_token.slice(item_token.indexOf('sid=')+4))
                }
                localStorage.setItem("hs_token_list_all",JSON.stringify(token_list_all));
                localStorage.setItem("hs_token_list_all_first",JSON.stringify(token_list_all));
            }
            if(token4){
                let token_list_all = [];
                let token_list_all_arr = token4.split(",");
                for(let i=0;i<token_list_all_arr.length;i++){
                    let item_token = token_list_all_arr[i];
                    token_list_all.push(item_token.slice(item_token.indexOf('sid=')+4))
                }
                localStorage.setItem("hs_token_list_all_xiaohao_first",JSON.stringify(token_list_all));
            }
            if(token5){
                let token_list_all = [];
                let token_list_all_arr = token5.split(",");
                for(let i=0;i<token_list_all_arr.length;i++){
                    let item_token = token_list_all_arr[i];
                    token_list_all.push(item_token.slice(item_token.indexOf('sid=')+4))
                }
                localStorage.setItem("hs_token_list_all_cangkun_first",JSON.stringify(token_list_all));
            }
            if(token3 || token4 || token5){
                alert("保存成功")
            }
        }
    </script>
</body>

</html>